import { baseOption } from "./baseOption";
export const bar = (settings, options = {}) => {
  return {
    ...baseOption(),
    ...options,
    series: [
      {
        type: "bar",
        ...settings,
      },
    ],
  };
};

// 多个series
export const barList = (settings, options = {}, list) => {
  let seriesList = [];
  list.forEach((e) => {
    seriesList.push({
      type: "bar",
      ...e,
    });
  });

  return {
    ...baseOption(),
    ...options,
    series: seriesList,
  };
};
